package com.weharvest.edu.dao;


import com.weharvest.edu.entity.BackstageUser;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Optional;

public interface BackstageUserDao extends  JpaRepository<BackstageUser,String> {

       //查询该角色
       BackstageUser findByIdAndStateAndFlag(String id,Integer state, String flag);

       //查询该角色
       BackstageUser findByIdAndFlag(String id, String flag);

       // 根据openid查找
       BackstageUser findByOpenid(String openid);
       // 验证用户名和密码是否正确
       BackstageUser findByNameAndPasswordAndStateAndFlag(
               String name,String password,Integer state, String flag);
}
